package com.mall.web.util;

import java.util.ArrayList;
import java.util.List;

import com.mall.vo.eshop.EShopKeFuVO;

/**
 * 买个店的webutil
 * 
 * @author Administrator
 *
 */
public class MaiGeDianWebUtil {
	private static EShopKeFuVO maigedianEShopKeFuVO = null;
	public static List<EShopKeFuVO> eShopKeFuVOList = null;
	static {
		maigedianEShopKeFuVO = new EShopKeFuVO();
		maigedianEShopKeFuVO.setGongHao("000001");
		maigedianEShopKeFuVO.setKefuName("买个店官方客服");
		maigedianEShopKeFuVO.setKefuZhiWei("官方客服");
		maigedianEShopKeFuVO.setPhone("15658022368");
		maigedianEShopKeFuVO.setPic("/eshop/eshopDetail/logo.png");
		maigedianEShopKeFuVO.setTel("0571-87837026");
		maigedianEShopKeFuVO.setQq("2852375149");
		
		eShopKeFuVOList = new ArrayList<>();
		EShopKeFuVO eShopKeFuVO = new EShopKeFuVO();
		eShopKeFuVO.setId(1l);
		eShopKeFuVO.setGongHao("21586");
		eShopKeFuVO.setKefuName("买个店客服小王");
		eShopKeFuVO.setKefuZhiWei("客服经理");
		eShopKeFuVO.setPic("/eshop/eshopDetail/logo.png");
		eShopKeFuVO.setQq("1163635657");
		eShopKeFuVO.setPhone("400-123-123");
		eShopKeFuVO.setTel("400-123-123");
		eShopKeFuVOList.add(eShopKeFuVO);
	}

	/**
	 * 获取官方客服信息
	 * 
	 * @return
	 */
	public static EShopKeFuVO getGuanFangEShopKeFuVO() {
		return maigedianEShopKeFuVO;
	}

	/**
	 * 获取详情页的客服人員信息
	 * 
	 * @param index
	 * @return
	 */
	public static EShopKeFuVO getEShopKeFuVOFromList(int index) {
		if (index < 0 || index > eShopKeFuVOList.size() - 1) {
			return maigedianEShopKeFuVO;
		}
		return eShopKeFuVOList.get(index);
	}
}
